Skip to content

Conversation

jkrems
Copy link
Contributor

@jkrems jkrems commented Sep 24, 2024

Runs all existing karma tests twice: Once in an environment that uses the application builder and once in one that uses the browser builder. The general approach is taken from the dev server tests.

This is in preparation for supporting the application builder for karma tests.

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

All karma builder-related tests are run twice: Once in a harness that includes a "browser" development builder and once with a "application" development builder.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

watch: false,
});

const optionSchemaCache = new Map<string, json.schema.JsonSchema>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is similar to the dev-server code and could likely be refactored to be shared across builders: https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/dev-server/tests/jasmine-helpers.ts#L18-L25

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to improve the test harness in general so that refactor could fit in there. Probably a good item for the next fixit.

@jkrems jkrems added the target: patch This PR is targeted for the next patch release label Sep 24, 2024
@jkrems jkrems marked this pull request as ready for review September 24, 2024 17:37
@jkrems jkrems requested a review from alan-agius4 September 24, 2024 17:37
Runs all existing karma tests twice: Once in an environment that uses the
application builder and once in one that uses the browser builder. The
general approach is taken from the dev server tests.

This is in preparation for supporting the application builder for karma tests.
"extract-i18n": {},
"karma": {
"shards": 3,
"shards": 6,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theory: We're doubling the number of tests, so we can (and should) double the number of shards.

@jkrems jkrems added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 24, 2024
@jkrems jkrems requested review from clydin and removed request for alan-agius4 September 25, 2024 15:15
@jkrems
Copy link
Contributor Author

jkrems commented Sep 25, 2024

(Switching reviewers after checking champion of the application builder feature gap work in general.)

@jkrems jkrems added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 25, 2024
@jkrems jkrems merged commit 66c55df into angular:main Sep 25, 2024
33 checks passed
@jkrems
Copy link
Contributor Author

jkrems commented Sep 25, 2024

The changes were merged into the following branches: main, 18.2.x

@jkrems jkrems deleted the jk-karma-app-test branch September 25, 2024 16:17
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: @angular-devkit/build-angular target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants